<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Connecting to CUBRID databases</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.pdo-cubrid.html">CUBRID (PDO)</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="pdo.cubrid-schema.html">PDO::cubrid_schema</a></div>
 <div class="up"><a href="ref.pdo-cubrid.html">CUBRID (PDO)</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="ref.pdo-cubrid.connection" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">PDO_CUBRID DSN</h1>
    <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">PDO_CUBRID DSN</span> &mdash; <span class="dc-title">Connecting to CUBRID databases</span></p>

   </div>

   <div class="refsect1 description" id="refsect1-ref.pdo-cubrid.connection-description">
    <h3 class="title">说明</h3>
    <p class="para">
     The PDO_CUBRID Data Source Name (DSN) is composed of the following elements, delimited by semicolons:
     <dl>

      
       <dt>
DSN prefix</dt>

       <dd>

        <p class="para">
        The DSN prefix is <strong class="userinput"><code>cubrid:</code></strong>.
        </p>
       </dd>

      
      
       <dt>
<em>host</em></dt>

       <dd>

        <p class="para">
         The hostname on which the database server resides.
        </p>
       </dd>

      
      
       <dt>
<em>port</em></dt>

       <dd>

        <p class="para">
         The port on which the database server is running.
        </p>
       </dd>

      
      
       <dt>
<em>dbname</em></dt>

       <dd>

        <p class="para">
         The name of the database.
        </p>
       </dd>

      
     </dl>

    </p>
   </div>


   <div class="refsect1 notes" id="refsect1-ref.pdo-cubrid.connection-notes">
    <h3 class="title">注释</h3>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      When you estalish the connection to CUBRID, you should give username and
      password except DSN.
     </p>
    </p></blockquote>
   </div>


   <div class="refsect1 examples" id="refsect1-ref.pdo-cubrid.connection-examples">
    <h3 class="title">范例</h3>
    <p class="para">
     <div class="example" id="example-941">
      <p><strong>Example #1 PDO_CUBRID DSN examples</strong></p>
      <div class="example-contents"><p>
       The following example shows a PDO_CUBRID DSN for connecting to a CUBRID database:
       <div class="example-contents"><div class="cdata"><pre>
cubrid:host=localhost;port=33000;dbname=demodb
</pre></div>
       </div>

      </p></div>
     </div>
    </p>
   </div>

  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.pdo-cubrid.html">CUBRID (PDO)</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="pdo.cubrid-schema.html">PDO::cubrid_schema</a></div>
 <div class="up"><a href="ref.pdo-cubrid.html">CUBRID (PDO)</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
